export default {
  namespaced: true,
  state: {
    loginModalVisible: false,
    loginState: !!localStorage.getItem('token'),
    beforeLoginedPushPath: '',
    uuid: '',
  },
  mutations: {
    showLoginModal(state, val) {
      state.loginModalVisible = val
    },

    modifyLoginState(state, val) {
      state.loginState = val
    },
    modifyBeforeLoginedPushPath(state, val) {
      state.beforeLoginedPushPath = val
    },
    modifyUuid(state, val) {
      state.uuid = val
    },

    clearBeforeLoginedPushPath(state) {
      state.beforeLoginedPushPath = ''
    },
    clearUuid(state) {
      state.uuid = ''
    }
  }
}